import Vue from 'vue'
import axios from 'axios'

import App from './App'
import ElementUI from 'element-ui';
import socket from './socket';
import './assets/css/element-variables.scss'
//挂再到实例的下面
Vue.socket = Vue.prototype.socket = socket
socket.on('connect', async () => {
  console.log('连接服务端端成功');
  // socket.emit('sendmessage', {name:'lixiaolong',id:23,type:1});
 
  // socket.emit('private message',23,23,{text:'你好'});
});
// socket.on('to'+23, function (data) {
//   console.log(data)

// });
// socket.send({
//   id:'9',
//   msg:'你好服务器',
//   type:1,
// });


import router from './router'
import store from './store'
Vue.use(ElementUI);
if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
Vue.http = Vue.prototype.$http = axios
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  components: { App },
  router,
  store,
  template: '<App/>'
}).$mount('#app')
